<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>ACE:  File sorgente accesso_dati.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.ico"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">ACE
   </div>
   <div id="projectbrief">Gestionale Circolo Tennis</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generato da Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Cerca');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Pagina&#160;Principale</span></a></li>
      <li><a href="annotated.html"><span>Classi</span></a></li>
      <li class="current"><a href="files.html"><span>File</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Cerca" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Elenco&#160;dei&#160;file</span></a></li>
      <li><a href="globals.html"><span>Elementi&#160;dei&#160;file</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tutto</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classi</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>File</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funzioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variabili</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Ridefinizioni di tipo (typedef)</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Tipi enumerati (enum)</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Valori del tipo enumerato</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Definizioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pagine</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">accesso_dati.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="accesso__dati_8h.html">Vai alla documentazione di questo file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#ifndef ACCESSO_DATI</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define ACCESSO_DATI</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="struttura__dati_8h.html" title="Header contenente le strutture dati comuni.">struttura_dati.h</a>&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">/* Inizio interfaccia del modulo accesso_dati */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<a class="code" href="structcircolo__t.html" title="Struttura reppresentante il Circolo.">circolo_t</a> *<a class="code" href="accesso__dati_8cc.html#a5f411b92b995ff84d3acd8bc0da1191e" title="Inizializza il Circolo con i dati della società.">inizializza_circolo</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> nome[], <span class="keyword">const</span> <span class="keywordtype">char</span> indirizzo[], <span class="keyword">const</span> <span class="keywordtype">char</span> email[], <span class="keyword">const</span> <span class="keywordtype">char</span> telefono[]);</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *<a class="code" href="accesso__dati_8cc.html#a866ed70e148eecf0441dfb6ac0a5ebe2" title="Aggiunge o modifica un giocatore al Circolo.">aggiungi_giocatore</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> nome[], <span class="keyword">const</span> <span class="keywordtype">char</span> cognome[], <span class="keyword">const</span> <span class="keywordtype">char</span> nascita[],</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                                <span class="keyword">const</span> <span class="keywordtype">char</span> tessera[], <span class="keyword">const</span> <span class="keywordtype">char</span> telefono[], <span class="keyword">const</span> <span class="keywordtype">char</span> email[], <span class="keyword">const</span> <span class="keywordtype">char</span> classifica[],</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;                                <span class="keyword">const</span> <span class="keywordtype">char</span> circolo_g[], <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *vecchio, <a class="code" href="structcircolo__t.html" title="Struttura reppresentante il Circolo.">circolo_t</a> *<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *<a class="code" href="accesso__dati_8cc.html#a82dfa124abc5caaf2cff650dc1350f41" title="Aggiunge o modifica un socio al Circolo.">aggiungi_socio</a>     (<span class="keyword">const</span> <span class="keywordtype">char</span> nome[], <span class="keyword">const</span> <span class="keywordtype">char</span> cognome[], <span class="keyword">const</span> <span class="keywordtype">char</span> nascita[],</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;                                <span class="keyword">const</span> <span class="keywordtype">char</span> tessera[], <span class="keyword">const</span> <span class="keywordtype">char</span> telefono[], <span class="keyword">const</span> <span class="keywordtype">char</span> email[], <span class="keyword">const</span> <span class="keywordtype">char</span> classifica[],</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                                <span class="keywordtype">bool</span> retta, <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *vecchio, <a class="code" href="structcircolo__t.html" title="Struttura reppresentante il Circolo.">circolo_t</a> *<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *<a class="code" href="accesso__dati_8cc.html#a377ecb279ec8310e63e4b6c1196e703b" title="Aggiunge un campo al Circolo.">aggiungi_campo</a>(<span class="keywordtype">int</span> numero, <a class="code" href="struttura__dati_8h.html#ad0f5a2191c29d4cd4c52506513493755" title="Tipo che rappresenta il tipo di copertura del campo.">copertura_t</a> copertura, <a class="code" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7" title="Tipo che rappresenta il tipo di terreno.">terreno_t</a> terreno, <span class="keyword">const</span> <span class="keywordtype">char</span> note[], <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *vecchio, <a class="code" href="structcircolo__t.html" title="Struttura reppresentante il Circolo.">circolo_t</a> *<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *<a class="code" href="accesso__dati_8cc.html#afb27649ae77b89edeb03bc022d948820" title="Aggiunge un ora al campo.">aggiungi_ora</a>(<span class="keywordtype">int</span> orario, <span class="keyword">const</span> <span class="keywordtype">char</span> data[], <span class="keywordtype">int</span> durata, <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *prenotante, <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="accesso__dati_8cc.html#ac8878839cd059af1d8b17b2a466914b5" title="Restituisce il nome associato all&#39;ora.">get_nome_ora</a>(<a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *ora);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="accesso__dati_8cc.html#a12b38a45d6c7fff5a4e86a7f697857fa" title="Elimina il socio dal Circolo.">elimina_socio</a>(<a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *socio, <a class="code" href="structcircolo__t.html" title="Struttura reppresentante il Circolo.">circolo_t</a> *<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="accesso__dati_8cc.html#a5f9d73db750b97d0e7a47c2d0843f1f5" title="Elimina il giocatore dal Circolo Elimina i giocatore passato come parametro dal circolo.">elimina_giocatore</a>(<a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *giocatore, <a class="code" href="structcircolo__t.html" title="Struttura reppresentante il Circolo.">circolo_t</a> *<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="accesso__dati_8cc.html#a34b3c4cdedff1bc3af44d063f8df0bb7" title="Elimina il campo dal Circolo.">elimina_campo</a>(<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo, <a class="code" href="structcircolo__t.html" title="Struttura reppresentante il Circolo.">circolo_t</a> *<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="accesso__dati_8cc.html#aa69bec6817bd86b46f214ac511f85214" title="Elimina l&#39;ora dal campo.">elimina_ora</a>(<a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *ora, <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="accesso__dati_8cc.html#a6ab541cc7d58b854e085a8fcef76e581" title="Elimina il circolo dalla memoria.">elimina_circolo</a>(<a class="code" href="structcircolo__t.html" title="Struttura reppresentante il Circolo.">circolo_t</a> *&amp;<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="code" href="accesso__dati_8h.html#a8c471a7dcca8667fd9f4019c9fe2e40f">  138</a></span>&#160;<span class="preprocessor">#define cerca_lista_int(lista, campo, dati, tipo)               \</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="preprocessor">({                                                              \</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="preprocessor">        GList *res = 0;                                         \</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="preprocessor">        GList *tmp = lista;                                     \</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="preprocessor">        while(tmp){                                             \</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="preprocessor">                tipo *elemento = (tipo *) tmp-&gt;data;            \</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="preprocessor">                if ( ((int) elemento-&gt;campo) == dati )                  \</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="preprocessor">                        res = g_list_append(res, elemento);     \</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="preprocessor">                tmp = g_list_next(tmp);                         \</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="preprocessor">        }                                                       \</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="preprocessor">        res;                                                    \</span></div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="preprocessor">})</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="comment">/* Fine interfaccia del modulo accesso_dati */</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generato Mer 8 Ott 2014 19:12:40 per ACE da &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</small></address>
</body>
</html>
